let app = getApp()
Component({
    properties: {
      virtualCardInfo: {
        type: Array,
        observer: function(newVal, oldVal) {
          this.updateRate()
        }
      }
      },
      data:{
       
      },
    lifetimes: {
        attached: function () {
           
       }
      },
    methods: {
      cancelcard:function(){
        this.setData({
          virtualCardInfo:0,
          visible:false,
          maskShow:false
        })
      },
      updateRate:function(){
        var virtualCard=this.data.virtualCardInfo
        console.log('电子凭证')
        console.log(virtualCard)
        console.log(virtualCard[0])
        if(virtualCard!=0)
        {
          this.setData({
            visible:true,
            maskShow:true
          })
        }
        else
        {
          this.setData({
            visible:false,
            maskShow:false
          })
        }
      }
    }
});
